import React, { memo } from "react";
import { Provider } from "react-redux";
import { renderRoutes } from "react-router-config";
import { HashRouter } from "react-router-dom";

import store from "@/store";

import routes from "@/router";

import AppPlayerBar from "./pages/player/app-player-bar";
import AppFooter from "@/components/app-footer";
import AppHeader from "@/components/app-header";
import BottomMusic from "./components/bottom-music";
export default memo(function App() {
  return (
    <Provider store={store}>
      <HashRouter>
        <AppHeader></AppHeader>
        {renderRoutes(routes)}
        <AppFooter></AppFooter>
        <BottomMusic></BottomMusic>
        <AppPlayerBar />
      </HashRouter>
    </Provider>
  );
});
